import { pubRequire } from '@utils/public'
const baseUrl = '/landing-pages'
/* 落地页名称 */
export function landingPageName(obj, callbBack, errBack) {
  return pubRequire('get', `${baseUrl}/landing-names`, obj, callbBack, errBack)
}
/* 落地页列表 */
export function landingPageList(obj, callbBack, errBack) {
  return pubRequire('get', `${baseUrl}`, obj, callbBack, errBack)
}
/* 禁用落地页 */
export function disablePage(id, obj, callbBack, errBack) {
  return pubRequire('put', `${baseUrl}/${id}/disable`, obj, callbBack, errBack)
}
/* 启用落地页 */
export function enablePage(id, obj, callbBack, errBack) {
  return pubRequire('put', `${baseUrl}/${id}/enable`, obj, callbBack, errBack)
}
/* 删除落地页 */
export function delLandingPage(id, obj, callbBack, errBack) {
  return pubRequire('delete', `${baseUrl}/${id}`, '', callbBack, errBack)
}
/* 新增落地页 */
export function addLandingPage(obj, callbBack, errBack) {
  return pubRequire('post', `${baseUrl}`, obj, callbBack, errBack)
}
/* 落地页详情 */
export function landingPageDetail(id, obj, callbBack, errBack) {
  return pubRequire('get', `${baseUrl}/${id}`, '', callbBack, errBack)
}
/* 编辑落地页 */
export function editLandingPage(id, obj, callbBack, errBack) {
  return pubRequire('put', `${baseUrl}/${id}`, obj, callbBack, errBack)
}
